<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/chengpingchurukurecord/mes_churuku/mes_ChuRuKu.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/chengpingchurukurecord/mes_churuku/mes_ChuRuKu.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '成品出入库记录',
                name: 'mes_churuku/mes_ChuRuKu',
                url: "/mes_ChuRuKu/",
                sortName: "id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"type1":"","type2":"","create_time":"","ck_id":"","hw_id":""});
            const searchFormOptions = ref([[{"title":"仓库id","field":"ck_id","type":"number"}],[{"title":"货位id","field":"hw_id","type":"number"}],[{"dataKey":"入库状态","data":[],"title":"类别(1出库，2入库)","field":"type2"}],[{"title":"类型(1原材料，2成品，3半成品)","field":"type1"}],[{"title":"创建时间","field":"create_time"}]]);
            const columns = ref([{field:'id',title:'主键，唯一标识每条出入库记录',type:'int',sort:true,width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'type1',title:'类型(1原材料，2成品，3半成品)',type:'string',width:220,align:'left',sort:true},
                       {field:'type2',title:'类别(1出库，2入库)',type:'string',bind:{ key:'入库状态',data:[]},width:220,align:'left'},
                       {field:'create_time',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'caozuoyuan',title:'制单人',type:'string',width:220,align:'left'},
                       {field:'Comment',title:'备注',type:'string',width:110,align:'left'},
                       {field:'orderId',title:'关联订单 id',type:'string',width:220,align:'left'},
                       {field:'orderNo',title:'关联订单编号',type:'string',width:220,align:'left'},
                       {field:'ShengChanId',title:'关联生产 id',type:'string',width:220,align:'left'},
                       {field:'ShengChanNo',title:'关联生产编号',type:'string',width:220,align:'left'},
                       {field:'No',title:'编号',type:'string',width:220,align:'left'},
                       {field:'status_Type',title:'状态',type:'string',bind:{ key:'status',data:[]},width:220,align:'left'},
                       {field:'goods_info',title:'商品详情',type:'string',width:110,align:'left'},
                       {field:'shenhe',title:'审核状态（0未审核，1审核）',type:'string',width:220,align:'left'},
                       {field:'p_id',title:'生产计划表production的id',type:'string',width:220,align:'left'},
                       {field:'ck_id',title:'仓库id',type:'int',width:110,align:'left'},
                       {field:'hw_id',title:'货位id',type:'int',width:110,align:'left'},
                       {field:'p_number',title:'生产计划编号',type:'string',width:220,align:'left'},
                       {field:'pg_id',title:'流转单id',type:'int',width:110,align:'left'},
                       {field:'shenhe_uid',title:'审核人id',type:'string',width:220,align:'left'},
                       {field:'shenhe_name',title:'审核人',type:'string',width:220,align:'left'},
                       {field:'shenhe_time',title:'审核时间',type:'string',width:220,align:'left'},
                       {field:'picking_uid',title:'领料人id',type:'string',width:220,align:'left'},
                       {field:'picking_name',title:'领料人',type:'string',width:220,align:'left'},
                       {field:'picking_b_id',title:'领料班组id',type:'string',width:220,align:'left'},
                       {field:'picking_b_name',title:'领料班组',type:'string',width:220,align:'left'},
                       {field:'type_crk',title:'发货单的类型(0普通，1批量)',type:'string',width:220,align:'left'},
                       {field:'YaoQiuFaHuoDate',title:'要求发货时间',type:'string',width:220,align:'left'},
                       {field:'contract_no',title:'合同号',type:'string',width:220,align:'left'},
                       {field:'receiver',title:'领用人',type:'string',width:220,align:'left'},
                       {field:'ruku_time',title:'入库时间',type:'string',width:220,align:'left'},
                       {field:'dibang',title:'地磅重量',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
